This invention generally relates to a technique of logical inversion of input/output signals in accordance with program designation in a programmable sequence controller and more particularly to such a sequence controller which is suitable for high speed control.
Conventionally, a sequence control circuit based on the operations of relays has employed relay contacts, especially NO (normally open) contacts and NC (normally closed) contacts in combination, to constitute a complicated control circuit, which is liable to suffer from many inconveniences particularly in altering a connection. Therefore, in recent years, various types of sequence control apparatus formed primarily of semiconductor circuits and which are programmable (hereinafter referred to as a sequence controller) have been proposed.
In the typical sequence controller, programming and logical operation for the NC contact have been performed in various ways.
For example, the sequence controller has a basic construction as shown in FIG. 1, which comprises an input signal source 1 having a contact 01 (NO contact), a contact 02 (NC contact), a contact 03 (NO contact) . . . , and a contact n (NO contact), an input section 2, a central processing unit (CPU) 3 for performing logical operations based on programmed sequence data stored in a user RAM 5, a system ROM 4 for storing instructions for controlling the processing in the CPU, an output section 6 for delivery of operation results from the CPU to an external unit, and a programming section 7 for the programming contents of the sequence.
In the sequence controller constructed as described above, information regarding the contacts of a sequence circuit as shown in FIG. 2 is stored in the user RAM in various formats, for example, as shown in FIGS. 3a and 3b.
With reference to FIG. 3a, an instruction word LD indicates that a contact signal representative of an input signal 01 following the instruction word shall be "inputted", and an instruction word ANDNOT indicates that a contact signal representative of an input signal 02 following the instruction word shall be "inputted, inverted and thereafter ANDed". These instruction words are defined by specified codes.
Thus, in accordance with the processing procedure stored in the system ROM 4, the CPU 3 first reads the instruction word LD of the contents stored in the user RAM 5 and interprets the instruction word as "be inputted", then proceeds with "reading the input code 01" and generating an input signal corresponding to the code 01 of the input signal source, and thereafter reads the contact signal.
Subsequently, the processing proceeds to read and interpret the instruction word ANDNOT, read the input code "02", and generate a corresponding input signal and read the contact signal as in the preceding operation. Thereafter, in this case, the contact signal is inverted and ANDed with the previous input contact signal (01). In this manner, all the operations are carried out in accordance with the processing procedures stored in the system ROM 4.
When using the format shown in FIG. 3b, a similar processing is carried out. In this case, a code for inversion is defined in part of an input number, and an instruction word AND is defined to indicate that "the following input signals shall be ANDed". Apart from the above, the operations resemble those described with reference to FIG. 3a.
As will be seen from the foregoing, in the prior art apparatus, the sequence program for processing the NC contact signal is more sophisticated than for processing the NO contact signal. Moreover, the CPU 3 needs to be supplied from the ROM 4 with a processing procedure (instruction) indicating that "the NC contact signal shall be inverted", resulting in the serious problem that the processing time is prolonged.